package com.share.lottery.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.share.lottery.R;
import com.share.lottery.adapter.PlDetalAdapter;
import com.share.lottery.base.BaseFragment;

/**
 * @author py
 *home页面的fragment
 */
public class HomeFragment extends BaseFragment {
	private ImageView imgUserHead,imgSex;//用户头像
	private View convertView;
	private TextView tvTime,tvName;
	
	private TextView tvJl;//距离
	private ImageView imgShow;//展示的大图片
	private TextView tvTitle;//标题s
	private TextView tvContet;//内容
	private TextView tvMore;//更多按钮
	private TextView tvZanS;//赞的数目
	private TextView tvPls;//评论数 
	private TextView tvShare;//分享数
	private TextView tvJb;//举报
	private ListView listPl;//评论列表
	
	private PlDetalAdapter adapter;
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		convertView = inflater.inflate(R.layout.weibo_show, container,false);
		init();
		return convertView;
	}
	public void findView() {
		imgUserHead = (ImageView) convertView.findViewById(R.id.img_head);
		imgSex = (ImageView) convertView.findViewById(R.id.img_sex);
		tvTime = (TextView) convertView.findViewById(R.id.tv_gxqm);// 时间
		tvName = (TextView) convertView.findViewById(R.id.tv_name);
		
		tvJl = (TextView) convertView.findViewById(R.id.tv_jl);
		imgShow = (ImageView) convertView.findViewById(R.id.img_show);
		tvTitle  = (TextView) convertView.findViewById(R.id.tv_title);
		tvContet  = (TextView) convertView.findViewById(R.id.tv_content);
		tvMore  = (TextView) convertView.findViewById(R.id.tv_more);
		
		tvZanS  = (TextView) convertView.findViewById(R.id.tv_zans);
		tvPls  = (TextView) convertView.findViewById(R.id.tv_pls);
		tvShare  = (TextView) convertView.findViewById(R.id.tv_fxs);
		tvJb = (TextView) convertView.findViewById(R.id.tv_jb);
		listPl = (ListView) convertView.findViewById(R.id.list_pl_detal);
	}

	
	public void setData() {
		if (adapter == null) {
			adapter = new PlDetalAdapter(getActivity());
		}
		listPl.setAdapter(adapter);
		
	}


	public void getData() {
	

	}


	public void setOnClicker() {
	

	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
	}

}
